package server;

import java.io.Serializable;

public class Record implements Serializable{
	private static final long serialVersionUID = -5475585915200682381L;
	private long patient;
	private long doctor;
	private int division;
	private long nurse;
	private String notes;
	private long timestamp;
	
	public Record(long patient, long doctor, int division, long nurse,
			String notes) {
		this.patient = patient;
		this.doctor = doctor;
		this.division = division;
		this.notes = notes;
		this.nurse = nurse;
		timestamp = System.currentTimeMillis();
	}
	
	public long getPatient() {
		return patient;
	}
	public long getDoctor() {
		return doctor;
	}
	public void setDoctor(int doctor) {
		this.doctor = doctor;
	}
	public int getDivision() {
		return division;
	}
	public void setDivision(int division) {
		this.division = division;
	}
	public long getNurse() {
		return nurse;
	}
	public String getRecord() {
		return notes;
	}
	public void writeToRecord(String string) {
		notes = notes + string;
	}
	public void setNurse(long nurse) {
		this.nurse = nurse;
	}
	public long getTimestamp() {
		return timestamp;
	}
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("Patient:\t" + patient + "\n");
		sb.append("Timestamp:\t" + timestamp + "\n");
		sb.append("Doctor:\t" + doctor + "\n");
		sb.append("Nurse:\t" + nurse + "\n");
		sb.append("Division:\t" + division + "\n");
		sb.append("Notes:\t" + notes + "\n");
		sb.append("--" + "\n");
		return sb.toString();
	}
}
